{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=3400
  Verdict: Accepted
}
uses SysUtils, Math;
type point = record
     x,y:int64;
end;
var i,j,n,k,c,cnt,l,r:int64; res,ca,cb,cc,x,y,r1,r2,r3:extended; a,h:array[-10..2000010] of point;
procedure sort(l,r:int64);
var i,j,x:int64; y:point;
begin
i:=l;
j:=r;
x:=a[(l+r) div 2].x;
repeat
      while a[i].x<x do inc(i);
      while a[j].x>x do dec(j);
      if i<=j then begin
         y:=a[i];
         a[i]:=a[j];
         a[j]:=y;
         inc(i);
         dec(j);
      end;
until i>j;
if l<j then sort(l,j);
if i<r then sort(i,r);
end;
procedure sortY(l,r:int64);
var i,j,x:int64; y:point;
begin
i:=l;
j:=r;
x:=a[(l+r) div 2].y;
repeat
      while a[i].y<x do inc(i);
      while a[j].y>x do dec(j);
      if i<=j then begin
         y:=a[i];
         a[i]:=a[j];
         a[j]:=y;
         inc(i);
         dec(j);
      end;
until i>j;
if l<j then sortY(l,j);
if i<r then sortY(i,r);
end;
function vect(x1,y1,x2,y2:int64):int64;
begin
vect:=x1*y2-x2*y1;
end;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
read(n);
c:=0;
res:=0;
i:=0;
while i<n do begin
    inc(i);
    read(k);
    inc(k);
    j:=0;
    while j<k do begin
        inc(j);
        inc(c);
        read(a[c].x,a[c].y);
        if a[c].x<0 then a[c].x:=abs(a[c].x);
    end;
end;
sort(1,c);
l:=1;
r:=1;
i:=1;
while i<c do begin
        inc(i);
    if a[i].x=a[i-1].x then inc(r);
    if (a[i].x<>a[i-1].x) or (i=c) then begin
       if r-l>1 then sortY(l,r);
       l:=i;
       r:=i;
    end;
end;
cnt:=1;
h[1]:=a[1];
i:=1;
while i<c do begin
        inc(i);
    inc(cnt);
    h[cnt]:=a[i];
    while (vect(h[cnt].x-h[cnt-2].x,h[cnt].y-h[cnt-2].y,h[cnt].x-h[cnt-1].x,h[cnt].y-h[cnt-1].y)<=0) and (cnt>2) do begin
          dec(cnt);
          h[cnt]:=a[i];
    end;
end;
i:=1;
while i<cnt do begin
        inc(i);
    if (h[i].y<>h[i-1].y) and (h[i].x<>h[i-1].x) then begin
       ca:=(h[i-1].y-h[i].y)/(h[i-1].x-h[i].x);
       cb:=h[i-1].y-ca*h[i-1].x;
       res:=max(res,-cb*cb/ca);
    end;
end;
write(res:0:6);
end.